package com.mida.bms.report.api;

import com.mida.bms.report.entity.DocReportServiceLock;
import com.mida.tool.common.result.ActionResult;
import com.mida.tool.common.result.ListResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.DependsOn;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @ClassName: DocReportServiceLockApi
 * @Description: 报告业务锁feign
 * @Author: wang xiao le
 * @Date: 2021/7/28 13:44
 **/
@DependsOn("loadFromDatabasePropertyConfig")
@FeignClient(name = "docReportServiceLockApi", url = "bms.report.feign.url")
public interface DocReportServiceLockApi {

    /**
     * 添加锁
     *
     * @param docReportServiceLock
     * @return
     */
    @PostMapping(value = "/docReportServiceLock/insert", consumes = {"application/json;charset=UTF-8"})
    ActionResult insert(@RequestBody DocReportServiceLock docReportServiceLock);

    /**
     * 获取锁
     *
     * @param docReportServiceLock
     * @return
     */
    @PostMapping(value = "/docReportServiceLock/select", consumes = {"application/json;charset=UTF-8"})
    ListResult<DocReportServiceLock> select(@RequestBody DocReportServiceLock docReportServiceLock);

    /**
     * 删除锁
     *
     * @param docReportServiceLock
     * @return
     */
    @PostMapping(value = "/docReportServiceLock/delete", consumes = {"application/json;charset=UTF-8"})
    ActionResult delete(@RequestBody DocReportServiceLock docReportServiceLock);

    /**
     * 批量查询锁
     *
     * @param docReportServiceLockList
     * @return
     */
    @PostMapping(value = "/docReportServiceLock/selectLockList", consumes = {"application/json;charset=UTF-8"})
    ListResult<List<DocReportServiceLock>> selectLockList(@RequestBody List<DocReportServiceLock> docReportServiceLockList);
}
